// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "MyQuadtreeNodeManager.generated.h"

class AMyQuadtreeNode;

class AMyFPoi;

UCLASS()
class PROJECT_API AMyQuadtreeNodeManager : public AActor
{
	GENERATED_BODY()
	
public:	
	// Sets default values for this actor's properties
	AMyQuadtreeNodeManager();

	// 随机生成点
	UFUNCTION(BlueprintCallable)
	TArray<AMyFPoi*> GenerateRandomPois(int num, TSubclassOf<AMyFPoi> PoiClass);

	UFUNCTION(BlueprintCallable)
	void Init();

protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

public:	
	// Called every frame
	virtual void Tick(float DeltaTime) override;

	UPROPERTY(BlueprintReadWrite,EditAnywhere)
	AMyQuadtreeNode* QuadtreeNodeA;

	UPROPERTY(BlueprintReadWrite,EditAnywhere)
	AMyQuadtreeNode* QuadtreeNodeB;

	UPROPERTY(BlueprintReadWrite,EditAnywhere)
	FVector2D startPoint;

	UPROPERTY(BlueprintReadWrite,EditAnywhere)
	int width;

	UPROPERTY(BlueprintReadWrite,EditAnywhere)
	int height;

	UPROPERTY(BlueprintReadWrite,EditAnywhere)
	int zHeight;

	UPROPERTY(BlueprintReadWrite,EditAnywhere)
	int curCapacity;             //子节点容量

	UPROPERTY(BlueprintReadWrite,EditAnywhere)
	int max_depth;				 //最大深度

};




